package com.pure.common.factory;

public class AffectedPriceSpecFactory {

    public static <V> AffectedPriceSpec create(V basePrice) {
        if (null == basePrice) {
            return null;
        }

        if (basePrice instanceof AffectedPriceSpec) {
            return (AffectedPriceSpec) basePrice;
        }

        if (basePrice instanceof PriceImportHistory) {
            return new PriceImportHistory2AffectedPriceSpec((PriceImportHistory) basePrice);
        }
        return null;
    }

}
